package com.sunrise.gateway.commons;

public class Constants {
    public final static String SESSION_IN_REQUEST_NAME = "sessionInRequestName";//

    public final static String SESSION_EXPIRE_KEY_NAME = "SESSION_EXPIRE_KEY";  // 在session中 保存session过期时间的键名, 值为Integer

    public final static String AUTH_RETRIES_CACHE_NAME = "authRetryCache";

    public final static String SESSION_LAST_REQUEST_KEY = "lastRequest";

    public final static String SESSION_REQUEST_EXTRA_AUTH_TOKEN_KEY = "extraAuthToken";

    public final static String WECHAT_ACCESS_TOKEN = "wechatAccessToken";

    public final static String USER_INFO = "userInfo";
    public final static String SESSION_DEVICE_INFO = "SESSION_DEVICE_INFO";


    /**登录方式相关**/
    public final static String LOGIN_PASS_AUTHEN = "1";//用户名密码验证
    public final static String LOGIN_MESSAGE_AUTHEN = "2";//短信验证码验证
    public final static String LOGIN_PASS_AUTHEN_ADD_OPENID = "3";//用户名密码验证, 登录之后设置openid
    public final static String LOGIN_OPENID_AUTHEN = "4";//根据openid登录
    public final static String LOGIN_STORE_SWITCH = "5";//多门店切换身份
    public final static String LOGIN_MESSAGE_AUTHEN_ADD_OPENID = "6";//短信验证码验证, 登录之后设置openid


    /**错误信息相关**/
    public final static String USER_NOT_EXIST = "LOGIN_001";//系统不存在的用户（数据库没有记录，数据库记录软删除）
    public final static String USER_CREDIT_ERROR = "LOGIN_002";//用户名密码错误
    public final static String USER_PENDING = "LOGIN_003";//用户审核中
    public final static String USER_ADUIT_FAILURE = "LOGIN_004";//用户审核失败
    public final static String USER_ISDISABLED = "LOGIN_005";//用户已禁用
    public final static String USER_SESSION_INVALID = "LOGIN_006";//session失效
    public final static String USER_LOGIN_INVALID = "LOGIN_007";//无效的登录方式
    public final static String USER_OTHER_DEVICE_COMPETE = "LOGIN_008";//其他设备竞争登录, 导致登录被挤出

    public final static String USER_NOT_LOGIN = "AUTH_001";//用户未登陆
    public final static String USER_ILLEGAL = "AUTH_002";//用户无权限
    public final static String USER_EXCESSIVE_ATTEMPTS = "AUTH_003";//超过 一定时间内的 重试密码最大次数
    public final static String USER_ILLEGAL_ACCOUNT_SOURCE = "AUTH_004";//非法账号类型
    public final static String USER_ILLEGAL_LOGIN_DEVICE = "AUTH_005";//绑定app,其他app不能登录

    public final static String USER_LOGOUT_ERROR = "LOGOUT_001";//登出异常

    public final static String FRONTEND_VERSION_UPDATED = "FRONTEND_VERSION_UPDATED";

}
